package Day20;

public class Recursion01 {
    public static void main(String[] args) {
        T a = new T();
        int day = 7;
        int res = a.number(day);
        System.out.println(res);
    }

}
class T{
    public int number(int n){
        if (n > 0) {
            if(n == 1 || n ==2){
                return 1;
            }else{
                return number(n -1) + number(n -2);
            }
        }else{
            System.out.println("请输入大于0的整数");
            return -1;
        }
    }
}